Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect My Computer: Join cluster #29479

Merged
merged 32 commits into from
Aug 3, 2023
Merged

Connect My Computer: Join cluster #29479

merged 32 commits into from
Aug 3, 2023

Conversation

gzdunek
Copy link
Contributor

@gzdunek gzdunek commented Jul 24, 2023

Contributes to #27881

This PR adds the final step of the setup process - running the agent and joining the cluster.
More info in the RFD https://github.com/gravitational/teleport/blob/master/rfd/0133-connect-my-computer.md#joining-the-cluster.

Some notes on the changes:

  • In the create config file request, I sent profileName to the function in the main process. It was the only thing that necessary for the function. However, when launching the agent, it is more convenient to relay on RootClusterUri, especially when sending updates to the renderer. I decided to switch to RootClusterUri everywhere, to be consistent.
  • I was not sure how to show errors from the spawned process in the setup document. I decided for replacing the attempt value with the error if it happens, so the error in the UI is shown closely to the place where it come from. However, replacing attempts is quite complicated, so maybe we can just show an error notification.

@gzdunek gzdunek requested a review from ravicious July 24, 2023 17:01
@gzdunek gzdunek force-pushed the gzdunek/cmc-run-agent branch from e054576 to 7628d06 Compare July 24, 2023 17:02
@gzdunek gzdunek changed the title Connect My Computer: Run agent Connect My Computer: Join cluster Jul 24, 2023
@gzdunek gzdunek force-pushed the gzdunek/cmc-run-agent branch from 7628d06 to 365a5c4 Compare July 24, 2023 17:07
Copy link
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't run it yet, but the general idea behind the implementation seems good. As I mentioned in the last comment, let's set up a call to talk about some details related to async orchestration.

Base automatically changed from gzdunek/cmc-agent-config-file to master July 25, 2023 16:51
@gzdunek gzdunek mentioned this pull request Jul 25, 2023
8 tasks
@gzdunek gzdunek force-pushed the gzdunek/cmc-run-agent branch from 365a5c4 to 7ad0e97 Compare July 26, 2023 14:04
@gzdunek gzdunek requested a review from avatus July 26, 2023 14:06
@gzdunek gzdunek marked this pull request as ready for review July 26, 2023 14:06
@github-actions github-actions bot requested review from kimlisa and ravicious July 26, 2023 14:07
@gzdunek gzdunek removed the request for review from kimlisa July 26, 2023 14:07
@gzdunek gzdunek force-pushed the gzdunek/cmc-run-agent branch from 7ad0e97 to 72eaf48 Compare July 26, 2023 14:15
Copy link
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to review changes to the document on Monday.

Copy link
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a type error related to types, could you take a look at it? I didn't manage to find time to actually run the code anyway, will continue tomorrow.

@ravicious ravicious self-requested a review July 31, 2023 15:02
gzdunek added 4 commits July 31, 2023 17:24
# Conflicts:
#	web/packages/teleterm/src/mainProcess/fixtures/mocks.ts
#	web/packages/teleterm/src/mainProcess/runtimeSettings.ts
#	web/packages/teleterm/src/mainProcess/types.ts
#	web/packages/teleterm/src/ui/Documents/DocumentsRenderer.tsx
Copy link
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. 👍

I have a feeling we might have missed some edge cases, but it'll be much easier to iron them out with the full lifecycle being controllable from the UI.

@gzdunek
Copy link
Contributor Author

gzdunek commented Aug 2, 2023

Friendly ping @avatus

Copy link
Contributor

@avatus avatus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only did a code review and didn't find anything both of you didn't already discuss. I didn't get a chance to try it locally, sorry.

Very impressive stuff tho, the quality is top notch imo (as usual)

Copy link
Contributor

@espadolini espadolini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bot!

@gzdunek gzdunek added this pull request to the merge queue Aug 3, 2023
Merged via the queue into master with commit cc681c9 Aug 3, 2023
@gzdunek gzdunek deleted the gzdunek/cmc-run-agent branch August 3, 2023 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants